<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin:0;
            padding: 0;
        }
        .wrap {
            display:flex ;
            width:600px;
            height:600px;
            background-color: green;
            justify-content: center;
            align-items: center;
        }
        .planet {
            width:200px;
            height:200px;
            border:2px solid #fff;
            transform-style:preserve-3d ;
            position: absolute;
            border-radius: 50%;
            
            animation: plannet-rotate 20s linear infinite;
        }
        @keyframes plannet-rotate {
            0%{
                transform:rotate(45deg) skewY(-15deg) scaleY(0.5) rotateZ(0deg) ;
            }
            100%{
                transform : rotate(45deg) skewY(-15deg) scaleY(0.5) rotateZ(360deg) ;
            }
        }
        .ball {
            width:50px;
            height:50px;
            /* 找到离他最近的position属性不为static元素定位 */
            position: absolute;
            /* 轨道 */
            border-radius: 50%;
            /* ball 穿过轨道 -25px */
            top:-25px;
            /* 父容器的宽度的50% - 自身宽度的一半  中心点*/
            left:calc(50% - 25px);
            background-color: yellowgreen;
            animation: self-rotate 20s linear infinite;
            
        }
        @keyframes self-rotate {
            0%{
                transform:rotateZ(0deg) scaleY(2) skewY(15deg);
            }
            100%{
                transform:rotateZ(-360deg) scaleY(2) skewY(15deg);
            }
        }
    </style>
</head>
<body>
    <div class="wrap">
        <!-- 星球 -->
        <div class="planet">
            <div class="ball"></div>
        </div>
    </div>
</body>
</html>